package licode.unisop.platform.client.feign.impl;

import licode.unisop.platform.client.api.SiPlatformService;
import licode.unisop.platform.client.feign.PlatformApiFeign;
import licode.unisop.platform.client.info.*;
import licode.unisop.provider.info.SiAuthPlatToUserIn;
import licode.unisop.provider.info.SiPlatRealmUpdateIn;
import licode.unisop.provider.info.SiPlatformId;
import licode.unisop.provider.info.SiRemoveAllRelAsset;
import licode.unisop.unilite.utils.TryMethodCall;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author licode
 */
@Component
public class SiPlatformServiceFeignImpl implements SiPlatformService {
    @Resource
    private PlatformApiFeign platformApiFeign;

    @Override
    public void addPlatform(PlatformSaveIn platform) {
        TryMethodCall.execFeign(() -> platformApiFeign.addPlatform(platform));
    }

    @Override
    public void updatePlatform(PlatformSaveIn platform) {
        TryMethodCall.execFeign(() -> platformApiFeign.updatePlatform(platform));
    }

    @Override
    public void updatePlatformRealm(SiPlatRealmUpdateIn platform) {

    }

    @Override
    public void grantPlatform(SiAuthPlatToUserIn item) {

    }

    @Override
    public void saveAsset(PlatSaveAssetIn assetIn) {
        TryMethodCall.execFeign(() -> platformApiFeign.saveAsset(assetIn));
    }

    @Override
    public void removeAttrOfAsset(PlatRemoveAssetAttributeIn req) {

    }

    @Override
    public void saveHoldAssets(PlatSaveHoldAssetsIn req) {

    }

    @Override
    public void removeRelAsset(PlatRemoveRelAssetIn delInfo) {

    }

    @Override
    public void removeAllRelAsset(SiRemoveAllRelAsset delInfo) {

    }

    @Override
    public void saveAssetHolds(PlatSaveAssetHoldsIn req) {

    }
}
